<#import "/layout.html" as c>
<#import "/list_layout.html" as list>
<#assign alertList = []/>
<@c.html title="持仓中订单">
<!-- ================== 开始页面级CSS调用 ================== -->
<link href="${pluginsRoot}bootstrap-wizard/css/bwizard.min.css" rel="stylesheet"/>
<!-- 日历控件 -->
<link href="${pluginsRoot}/jquery.dtGrid/dependents/datePicker/skin/WdatePicker.css" rel="stylesheet"/>
<link href="${pluginsRoot}/jquery.dtGrid/dependents/datePicker/skin/default/datepicker.css" rel="stylesheet"/>
<!-- ================== 结束页面级CSS调用 ================== -->
    <@list.html title="持仓列表" subTitle="持仓列表" alertList=alertList permi="sys:myOrder:save" addBtn=true searchHint="">

    <!--&lt;!&ndash; 开始用户权限参数 &ndash;&gt;-->
            <!--<@shiro.hasPermission name="sys:myOrder:edit">-->
    <!--<input type="hidden" id="editPermi" value="1"/>-->
            <!--</@shiro.hasPermission>-->
        <!--<@shiro.hasPermission name="sys:orderHold:look">-->
        <!--<input type="hidden" id="lookPermi" value="1"/>-->
        <!--</@shiro.hasPermission>-->
        <@shiro.hasPermission name="sys:orderHold:force">
        <input type="hidden" id="pingPermi" value="1"/>
        </@shiro.hasPermission>
        <@shiro.hasPermission name="sys:orderHold:modify">
        <input type="hidden" id="modifyPermi" value="1"/>
        </@shiro.hasPermission>
        <@shiro.hasPermission name="sys:orderHold:repairLoss">
        <input type="hidden" id="repairPermi" value="1"/>
        </@shiro.hasPermission>
    <!-- 结束用户权限参数 -->
    <input type="hidden" value="${admin.userId}" id="userId">
    <input type="hidden" value="${admin.roleId}" id="roleId">

    <!-- 开启修改订单买入价格和股数模态窗口 -->
    <div class="modal fade" id="modifyModal" tabindex="-1" role="dialog">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">×</button>
                    <h4 class="modal-title"><a class="btn btn-info btn-xs m-l-10" data-toggle="collapse"
                                               href="#orderHoldModify" title="操作提示">
                        <i class="fa fa-exclamation"></i> &nbsp;提示 </a>
                    </h4>
                </div>
                <div class="modal-body">
                    <ul class="text-info p-b-15 p-l-15 collapse in" role="tabpanel" id="orderHoldModify">
                        <li class="m-b-3">点击确认修改持仓中订单的信息</li>
                    </ul>
                    <form id="modifyForm" autocomplete="off" action="${adminRoot}order/doOrderHoldModify.json"
                          method="post" data-parsley-validate="true">
                        <input type="hidden" name="orderId" id="modifyOrderId">
                        <div class="form-group">
                            <label class="control-label">股数 : </label>
                            <input type="number" id="modifyDealNumber" name="modifyDealNumber" class="form-control" title="股数"
                                   placeholder="请输入股数" maxlength="11" autocomplete="off" data-tip="tooltip" data-placement="auto"
                                   data-original-title="必填项，输入内容控制在1-11个数字。"  data-parsley-required="true" data-parsley-length="[1, 11]"
                                   onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}"
                                   onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}"/>
                        </div>
                        <div class="form-group">
                            <label class="control-label">买入价格 : </label>
                            <input type="text" id="modifyDealPrice" name="modifyDealPrice" class="form-control" title="买入价格"
                                   placeholder="请输入买入价格" maxlength="11" autocomplete="off" data-tip="tooltip" data-placement="auto"
                                   data-original-title="必填项，输入内容控制在1-11个数字。"  data-parsley-required="true" data-parsley-length="[1, 11]"
                                   onkeyup="value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"/>
                        </div>
                    </form>
                </div>
                <div class="modal-footer"><a href="javascript:;" class="btn btn-white" data-dismiss="modal">放弃操作</a> <a
                        href="javascript:;" class="btn btn-primary" data-loading-text="Loading..."
                        nc-ajax-submit-target="modifyForm" nc-ajax-submit>确认提交</a></div>
            </div>
        </div>
    </div>
    <!-- 结束修改订单买入价格和股数模态窗口 -->

    <!-- 开启平仓模态窗口 -->
    <div class="modal fade" id="addModal" tabindex="-1" role="dialog">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                    <h4 class="modal-title"> 平仓 <a class="btn btn-info btn-xs m-l-10" role="button"
                                                   data-toggle="collapse" href="#OperationTipsPingcang"
                                                   aria-expanded="true" title="操作提示"> <i class="fa fa-exclamation"></i>
                        &nbsp;提示 </a></h4>
                </div>
                <div class="modal-body">
                    <ul class="text-info p-b-15 p-l-15 collapse in" role="tabpanel" id="OperationTipsPingcang">
                        <li class="m-b-3">点击确认修改待平仓的订单为平仓中</li>
                    </ul>
                    <form id="addForm" autocomplete="off" action="${adminRoot}order/goPingcang.json" method="post"
                          data-parsley-validate="true">
                        <input type="hidden" name="id" class="oId">
                    </form>
                </div>
                <div class="modal-footer"><a href="javascript:;" class="btn btn-white" data-dismiss="modal">放弃操作</a> <a
                        href="javascript:;" class="btn btn-primary" data-loading-text="Loading..."
                        nc-ajax-submit-target="addForm" nc-ajax-submit>确认提交</a></div>
            </div>
        </div>
    </div>
    <!-- 结束平仓模态窗口 -->

<!-- 开启补亏模态窗口 -->
<div class="modal fade" id="modifyModal2" tabindex="-1" role="dialog">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">×</button>
                <h4 class="modal-title"><a class="btn btn-info btn-xs m-l-10" data-toggle="collapse" href="#repairLoss" title="操作提示">
                    <i class="fa fa-exclamation"></i> &nbsp;提示 </a>
                </h4>
            </div>
            <div class="modal-body">
                <ul class="text-info p-b-15 p-l-15 collapse in" role="tabpanel" id="repairLoss">
                    <li class="m-b-3">输入补亏金额进行补亏操作</li>
                </ul>
                <form id="modifyForm2" autocomplete="off" action="${adminRoot}order/repairLoss.json"
                      method="post" data-parsley-validate="true">
                    <input type="hidden" name="id" id="orderId">
                    <div class="form-group">
                        <label class="control-label">补亏金额&nbsp;: </label>
                        <input type="text" id="repair" name="repair" class="form-control" placeholder="请输入补亏金额" maxlength="11"
                               data-tip="tooltip" data-placement="auto" data-original-title="必填项" data-parsley-length="[1,11]" required
                               onkeyup="value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"/>
                    </div>
                </form>
            </div>
            <div class="modal-footer"><a href="javascript:;" class="btn btn-white" data-dismiss="modal">放弃操作</a> <a href="javascript:;" class="btn btn-primary" data-loading-text="Loading..." nc-ajax-submit-target="modifyForm2" nc-ajax-submit>确认提交</a></div>
        </div>
    </div>
</div>
<!-- 结束补亏模态窗口 -->
</@list.html>
<!-- ================== 开始页面级JavaScrip调用 ================== -->
<script src="${pluginsRoot}bootstrap-wizard/js/bwizard.js"></script>
<!-- 表单checkbox项 -->
<script src="${pluginsRoot}bootstrap-switch/bootstrap-switch.min.js"></script>
<!-- 日历控件 -->
<script src="${pluginsRoot}/jquery.dtGrid/dependents/datePicker/WdatePicker.js" defer="defer"></script>
<script src="${jsRoot}myOrderHold/myOrderHold.handle.js"></script>
<!-- ================== 结束页面级JavaScrip调用 ================== -->
</@c.html>